home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 19 / tpnet.zip / PASNETA.ASM < prev    next >
Assembly Source File  |  1987-05-07  |  27KB  |  1,807 lines

  1. Page 80,132
  2. ;*******************************************************
  3. ;*                               *
  4. ;* VERSION: 1.0                        *
  5. ;*                               *
  6. ;* MODULE NAME: PASNET.ASM    Language Interface     *
  7. ;*                               *
  8. ;* DESCRIPTION:  NetWare interface drivers           *                         *
  9. ;*                               *
  10. ;*        Borland Turbo Pascal interface           *
  11. ;*                               *
  12. ;* INPUTS:  Refer to individual procedures.           *
  13. ;*                               *
  14. ;*                               *
  15. ;* RETURNS (OUTPUTS)  Refer to individual procedures.  *
  16. ;*                               *
  17. ;*                               *
  18. ;*******************************************************
  19.  
  20. title    Turbo Pascal - NetWare Interface Module
  21.  
  22. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++
  23. ;+                               +
  24. ;+ For the following Turbo Pascal interface see        +
  25. ;+ the Borland Turbo Tutor manual and the           +
  26. ;+ Reference Manual                       +
  27. ;+                               +
  28. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++
  29.  
  30. cseg    segment byte public 'cseg'
  31.     assume    cs:cseg
  32.  
  33. public    xtndopn, setattr, eojstat, PRLH_Log, PRLH_Rel, PRLH_Clr, PRLF_Log
  34. public    PRLF_Rel, PRLF_Clr, PRLS_Lck, PRLS_Rel, PRLS_Clr, OpenSem, ExamSem
  35. public    WaitSem, SigSem, ClosSem, setlck, Bakouts, btrans, etrans, exclog
  36. public    exclcks, exculkf, exculks, excclrf, excclrs, reclog, reclck, reculk
  37. public    reculks, recclr, recclrs, eoj, sysout, volstat
  38. public    locdrv, wsid, errmode, bcsmode, ctlspl, splreq, pipreq, dpath, syslog
  39. public    fattr, updfcb, cpyfile, nettod, clsmode, drvmap, retshl, asclog
  40. public    asculkf, ascclrf, Get_PSN, Get_STA, SetServ, ModServ
  41.  
  42.  
  43.  
  44. ;     vector table - starts at 0000, with each ensuing call
  45. ;    offset by 3 (the jmp instruction and an offset address)
  46.     jmp    near ptr xtndopn
  47.     jmp    near ptr setattr
  48.     jmp    near ptr eojstat
  49.     jmp    near ptr PRLH_Log
  50.     jmp    near ptr PRLH_Rel
  51.     jmp    near ptr PRLH_Clr
  52.     jmp    near ptr PRLF_Log
  53.     jmp    near ptr PRLF_Rel
  54.     jmp    near ptr PRLF_Clr
  55.     jmp    near ptr PRLS_Lck
  56.     jmp    near ptr PRLS_Rel
  57.     jmp    near ptr PRLS_Clr
  58.     jmp    near ptr OpenSem
  59.     jmp    near ptr ExamSem
  60.     jmp    near ptr WaitSem
  61.     jmp    near ptr SigSem
  62.     jmp    near ptr ClosSem
  63.     jmp    near ptr setlck
  64.     jmp    near ptr Bakouts
  65.     jmp    near ptr btrans
  66.     jmp    near ptr etrans
  67.     jmp    near ptr exclog
  68.     jmp    near ptr exclcks
  69.     jmp    near ptr exculkf
  70.     jmp    near ptr exculks
  71.     jmp    near ptr excclrf
  72.     jmp    near ptr excclrs
  73.     jmp    near ptr reclog
  74.     jmp    near ptr reclck
  75.     jmp    near ptr reculk
  76.     jmp    near ptr reculks
  77.     jmp    near ptr recclr
  78.     jmp    near ptr recclrs
  79.     jmp    near ptr eoj
  80.     jmp    near ptr sysout
  81.     jmp    near ptr volstat
  82.     jmp    near ptr locdrv
  83.     jmp    near ptr wsid
  84.     jmp    near ptr errmode
  85.     jmp    near ptr bcsmode
  86.     jmp    near ptr ctlspl
  87.     jmp    near ptr splreq
  88.     jmp    near ptr pipreq
  89.     jmp    near ptr dpath
  90.     jmp    near ptr syslog
  91.     jmp    near ptr fattr
  92.     jmp    near ptr updfcb
  93.     jmp    near ptr cpyfile
  94.     jmp    near ptr nettod
  95.     jmp    near ptr clsmode
  96.     jmp    near ptr drvmap
  97.     jmp    near ptr retshl
  98.     jmp    near ptr asclog
  99.     jmp    near ptr asculkf
  100.     jmp    near ptr ascclrf
  101.     jmp    near ptr Get_PSN
  102.     jmp    near ptr Get_STA
  103.     jmp    near ptr SetServ
  104.     jmp    near ptr ModServ
  105.  
  106.  
  107.  
  108. ;--------------------------------
  109. ; Extended Open a File func(61) (3DH)
  110. ;
  111. ; var
  112. ;    Mode, Handle, RetCode : Integer;
  113. ;    Filename          : String[n];
  114. ;
  115. ; RetCode := xtndopn(Mode, Handle, Filename);
  116. ;
  117.  
  118. xtndopn proc    near
  119.     push    bp
  120.     mov    bp,sp
  121.     push    ds
  122.     lds    si,[bp+12]      ; put the mode in ax
  123.     mov    ax,[si]
  124.     mov    ah,03Dh         ; put the function in ah
  125.     lds    dx,[bp+4]       ;ptr to ASCIIZ string
  126.     inc    dx            ;add 1 to get to the beginning of the string
  127.     int    21h
  128.     jnc    noerr
  129.     jmp    quit
  130. noerr:
  131.     lds    di,[bp+8]       ;put the handle into the variable
  132.     mov    [di],ax          ;if there is no error and
  133.     xor    ax,ax             ;return a 0
  134. quit:
  135.     pop    ds
  136.     pop    bp
  137.     ret    14
  138. xtndopn endp
  139.  
  140.  
  141.  
  142.  
  143. ;--------------------------------
  144. ; Get or Set File Attributes(handle) func(67) (43H)
  145. ;
  146. ; var
  147. ;    Func, Attribute, ErrCode : Integer;
  148. ;    Filename         : String[n];
  149. ;
  150. ;ErrCode := setattr(Func, Attribute, Filename);
  151. ;
  152.  
  153. setattr proc    near
  154.     push    bp
  155.     mov    bp,sp
  156.     push    ds
  157.     lds    si,[bp+12]      ; put the subfunction in ax
  158.     mov    ax,[si]
  159.     mov    ah,043h         ; put the function in ah
  160.     lds    dx,[bp+4]       ;ptr to var desc block for ASCIIZ string
  161.     inc    dx            ;add 1 to get the address of the string
  162.     lds    si,[bp+8]       ;put the attribute to set in cx
  163.     mov    cx,[si]
  164.     int    21h
  165.     jnc    okay
  166.     mov    ah,00h
  167.     jmp    getout
  168. okay:
  169.     lds    di,[bp+8]       ;put the returned attributes in the
  170.     mov    [di],cx         ;variable if there is no error
  171.     xor    ax,ax            ;and return a 0
  172. getout:
  173.     pop    ds
  174.     pop    bp
  175.     ret    14
  176. setattr endp
  177.  
  178.  
  179.  
  180.  
  181. ;--------------------------------
  182. ; End of Job Flag Status func(187) (BBH)
  183. ;
  184. ; var
  185. ;    Flag : Integer;
  186. ;
  187. ;ErrCode := eojstat(Flag);
  188. ;
  189.  
  190. eojstat proc    near
  191.     push    bp
  192.     mov    bp,sp
  193.     push    ds
  194.     lds    si,[bp+4]   ; put the flag in ax
  195.     mov    ax,[si]
  196.     mov    ah,0BBh     ; put the function in ah
  197.     int    21h
  198.     mov    ah,0
  199.     lds    di,[bp+4]
  200.     mov    [di],ax
  201.     pop    ds
  202.     pop    bp
  203.     ret    6
  204. eojstat endp
  205.  
  206.  
  207.  
  208.  
  209. ;------------------------------------------------------------
  210. ;
  211. ; Physical Record Lock: Log Record   BCH
  212. ;
  213. ; var
  214. ;    ErrCode,FileHandle,HiByteOffset,LoByteOffset : Integer
  215. ;    HiLockLen,LoLockLen,Flags,TimeOut         : Integer
  216. ;
  217. ;ErrCode := PRLH_Log(FileHandle,HiByteOffset,LoByteOffset,HiLockLen,
  218. ;             LoLockLen,Flags,TimeOut);
  219. ;
  220.  
  221. PRLH_Log proc    near
  222.     push    bp
  223.     mov    bp,sp
  224.     push    ds
  225.     lds    si,[bp+28]        ;FileHandle
  226.     mov    bx,[si]
  227.     lds    si,[bp+24]        ;ByteOffset
  228.     mov    cx,[si]
  229.     lds    si,[bp+20]
  230.     mov    dx,[si]
  231.     lds    si,[bp+8]        ;AL = Log Flags
  232.     mov    ax,[si]
  233.     lds    si,[bp+16]        ;LockLen
  234.     mov    si,[si]
  235.     lds    di,[bp+12]
  236.     mov    di,[di]
  237.     lds    bp,[bp+4]        ;time out
  238.     mov    bp,[bp]
  239.     mov    ah,0BCH
  240.     int    21H
  241.     mov    ah,0            ;0 the high byte of the return
  242.     pop    ds
  243.     pop    bp
  244.     ret    30
  245.  
  246. PRLH_Log endp
  247.  
  248.  
  249.  
  250.  
  251.  
  252. ;-----------------------------------------
  253. ;
  254. ; Physical Record Lock: Release Rec  BDH
  255. ;
  256. ; var
  257. ;    FileHandle,HiByteOffset,LoByteOffset,ErrCode,
  258. ;       HiWordLen,LoWordLen : integer;
  259. ;
  260. ; ErrCode := PRLH_Rel(FileHandle,HiByteOffset,LoByteOffset,HiWordLen,
  261. ;                           LoWordLen:integer);
  262.  
  263.  
  264. PRLH_Rel proc    near
  265.     push    bp
  266.     mov    bp,sp
  267.     push    ds
  268.     lds    si,[bp+20]        ;FileHandle
  269.     mov    bx,[si]
  270.     lds    si,[bp+16]               ;HiByteOffset
  271.     mov    cx,[si]
  272.     lds    si,[bp+12]            ;LoByte
  273.     mov    dx,[si]
  274.      lds     si,[bp+8]             ;HiWordLen
  275.      mov     si,[si]
  276.      lds     di,[bp+4]             ;LoWordLen
  277.      mov     di,[di]
  278.     mov    ah,0BDH
  279.     int    21H
  280.     mov    ah,0
  281.     pop    ds
  282.     pop    bp
  283.     ret    22
  284. PRLH_Rel endp
  285.  
  286.  
  287.  
  288.  
  289.  
  290. ;------------------------------------------------
  291. ;
  292. ; Physical Record Lock: Release Clr  BEH
  293. ;
  294. ; var
  295. ;    FileHandle,HiByteOffset,LoByteOffset,ErrCode,
  296. ;    HiWordLen,LoWordLen : integer;
  297. ;  ErrCode := PRLH_Rel(FileHandle,HiByteOffset,LoByteOffset,HiWordLen,
  298. ;                           LoWordLen:integer);
  299. ;
  300.  
  301.  
  302. PRLH_Clr proc    near
  303.     push    bp
  304.     mov    bp,sp
  305.     push    ds
  306.     lds    si,[bp+20]        ;FileHandle
  307.     mov    bx,[si]
  308.     lds    si,[bp+16]               ;ByteOffset
  309.     mov    cx,[si]
  310.     lds    si,[bp+12]
  311.     mov    dx,[si]
  312.      lds     si,[bp+8]             ;HiWordLen
  313.      mov     si,[si]
  314.      lds     di,[bp+4]             ;LoWordLen
  315.      mov     di,[di]
  316.     mov    ah,0BEH
  317.     int    21H
  318.     mov    ah,0
  319.     pop    ds
  320.     pop    bp
  321.     ret    22
  322. PRLH_Clr endp
  323.  
  324.  
  325.  
  326.  
  327.  
  328. ;--------------------------------------------------
  329. ;
  330. ; Physical Record Lock: Log Rec FCB BFH
  331. ;
  332. ; var
  333. ;    ErrCode,fcb,HiByteOffset,LoByteOffset : Integer;
  334. ;    HiLockLen,LoLockLen,Flags,TimeOut     : Integer;
  335. ;
  336. ; ErrCode := PRLF_Log(fcb,HiByteOffset,LoByteOffset,HiLockLen,LoLockLen,Flags,TimeOut);
  337. ;
  338.  
  339.  
  340. PRLF_Log proc    near
  341.     push    bp
  342.     mov    bp,sp
  343.     push    ds
  344.     lds    si,[bp+28]              ;FCB
  345.     mov    dx,[si]
  346.     lds    si,[bp+24]              ;ByteOffset
  347.     mov    bx,[si]
  348.     lds    si,[bp+20]
  349.     mov    cx,[si]
  350.     lds    si,[bp+8]             ;AL = Log Flags
  351.     mov    ax,[si]
  352.     lds    si,[bp+12]              ;low lock length
  353.     mov    di,[si]
  354.     lds    si,[bp+16]              ;hi lock length
  355.     mov    si,[si]
  356.     mov    bp,[bp+4]             ;timeout value
  357.     mov    bp,[bp]
  358.     mov    ah,0BFH
  359.     int    21H
  360.     mov    ah,0
  361.     pop    ds
  362.     pop    bp
  363.     ret    28
  364. PRLF_Log endp
  365.  
  366.  
  367.  
  368.  
  369.  
  370. ;--------------------------------------------------
  371. ;
  372. ; Physical Record Lock: Rel Rec FCB C0H
  373. ;
  374. ; var
  375. ;    ErrCode,fcb,HiByteOffset,LoByteOffset : Integer;
  376. ;
  377. ; ErrCode := PRLF_Rel(fcb,HiByteOffset,LoByteOffset);
  378. ;
  379.  
  380.  
  381. PRLF_Rel proc    near
  382.     push    bp
  383.     mov    bp,sp
  384.     push    ds
  385.     lds    dx,[bp+12]              ;FCB
  386.     lds    si,[bp+8]             ;ByteOffset
  387.     mov    bx,[si]
  388.     lds    si,[bp+4]
  389.     mov    cx,[si]
  390.     mov    ah,0C0H
  391.     int    21H
  392.     mov    ah,0
  393.     pop    ds
  394.     pop    bp
  395.     ret    12
  396. PRLF_Rel endp
  397.  
  398.  
  399.  
  400.  
  401.  
  402. ;-----------------------------------------------
  403. ;
  404. ; Physical Record Lock: Clr Rec FCB C1H
  405. ;
  406. ; var
  407. ;    ErrCode,fcb,HiByteOffset,LoByteOffset : Integer;
  408. ;
  409. ; ErrCode := PRLF_clr(fcb,HiByteOffset,LoByteOffset);
  410. ;
  411.  
  412.  
  413. PRLF_Clr proc    near
  414.     push    bp
  415.     mov    bp,sp
  416.     push    ds
  417.     lds    dx,[bp+12]              ;FCB
  418.     lds    si,[bp+8]             ;ByteOffset
  419.     mov    bx,[si]
  420.     lds    si,[bp+4]
  421.     mov    cx,[si]
  422.     mov    ah,0C0H
  423.     int    21H
  424.     mov    ah,0
  425.     pop    ds
  426.     pop    bp
  427.     ret    12
  428. PRLF_Clr endp
  429.  
  430.  
  431.  
  432.  
  433.  
  434. ;---------------------------------------------
  435. ;
  436. ; Lock Record Set  C2H
  437. ;
  438. ; var
  439. ;    ErrCode, Flags, TimeOut : Integer;
  440. ;
  441. ; ErrCode := PRLS_Lck(Flags,TimeOut);
  442. ;
  443.  
  444.  
  445. PRLS_Lck proc    near
  446.     push    bp
  447.     mov    bp,sp
  448.     push    ds
  449.     lds    si,[bp+8]               ;AL = Lock flag bits
  450.     mov    ax,[si]
  451.     lds    si,[bp+4]               ;TimeOut Value
  452.     mov    bp,[si]
  453.     mov    ah,0C2h
  454.     int    21h
  455.     mov    ah,0
  456.     pop    ds
  457.     pop    bp
  458.     ret    10
  459. PRLS_Lck endp
  460.  
  461.  
  462.  
  463.  
  464.  
  465. ;----------------------------------------------
  466. ;
  467. ; Release Record Set  C3H
  468. ;
  469. ; var
  470. ;    ErrCode : Integer;
  471. ;
  472. ; ErrCode := PRLS_Rel;
  473. ;
  474.  
  475.  
  476. PRLS_Rel proc    near
  477.     mov    ah,0C3h
  478.     int    21h
  479.     mov    ah,0
  480.     ret
  481. PRLS_Rel endp
  482.  
  483.  
  484.  
  485.  
  486.  
  487. ;----------------------------------------------
  488. ;
  489. ; Clear Record Set  C4H
  490. ;
  491. ; var
  492. ;    ErrCode : Integer;
  493. ;
  494. ; errcode := PRLS_Clr;
  495. ;
  496.  
  497.  
  498. PRLS_Clr proc    near
  499.     mov    ah,0C4h
  500.     int    21h
  501.     mov    ah,0
  502.     ret
  503. PRLS_Clr endp
  504.  
  505.  
  506.  
  507.  
  508.  
  509. ;--------------------------------
  510. ; Semaphores func(197) (C5H) subfunction 00h
  511. ;
  512. ; var
  513. ;    RetCode,SemaValu,HiHandle,LoHandle,OpenCnt : Integer;
  514. ;    Sema4 : String[n];
  515. ;
  516. ; RetCode := OpenSem(Sema4,SemaValu,HiHandle,LoHandle,OpenCnt);
  517. ;
  518.  
  519.  
  520. OpenSem proc    near
  521.     push    bp
  522.     mov    bp,sp
  523.     push    ds
  524.     lds    dx,[bp+20]      ;ptr to Semaphore string
  525.     lds    si,[bp+16]      ;set semaphore value
  526.     mov    cx,[si]
  527.     mov    ax,0C500h        ;set the function
  528.     int    21h
  529.     mov    bh,00h
  530.     lds    di,[bp+4]      ;return the open count
  531.     mov    [di],bx
  532.     lds    di,[bp+8]      ;return low handle
  533.     mov    [di],cx
  534.     lds    di,[bp+12]      ;return high handle
  535.     mov    [di],dx
  536.     mov    ah,00h
  537.     pop    ds
  538.     pop    bp
  539.     ret    22
  540. OpenSem endp
  541.  
  542.  
  543.  
  544.  
  545.  
  546. ;--------------------------------
  547. ; Semaphores func(197) (C5H) subfunction 01h
  548. ;
  549. ; var
  550. ;    RetCode,HiHandle,LoHandle,SemaValu,OpenCnt : Integer;
  551. ;
  552. ; RetCode := ExamSem(HiHandle,LoHandle,SemaValu,OpenCnt);
  553. ;
  554.  
  555.  
  556. ExamSem proc    near
  557.     push    bp
  558.     mov    bp,sp
  559.     push    ds
  560.     lds    si,[bp+16]        ;hi handle
  561.     mov    dx,[si]
  562.     lds    si,[bp+12]        ;lo handle
  563.     mov    cx,[si]
  564.     mov    ax,0C501h        ;set function
  565.     int    21h
  566.     lds    di,[bp+8]               ;return semaphore value
  567.     mov    [di],cx
  568.     mov    dh,00h
  569.     lds    di,[bp+4]
  570.     mov    [di],dx              ;return open count
  571.     mov    ah,00h
  572.     pop    ds
  573.     pop    bp
  574.     ret    16
  575. ExamSem endp
  576.  
  577.  
  578.  
  579.  
  580.  
  581. ;--------------------------------
  582. ; Semaphores func(197) (C5H) subfunction 02h
  583. ;
  584. ; var
  585. ;    RetCode,HiHandle,LoHandle,TimeOut : Integer;
  586. ;
  587. ; RetCode := WaitSem(HiHandle,LoHandle,TimeOut);
  588. ;
  589.  
  590.  
  591. WaitSem proc    near
  592.     push    bp
  593.     mov    bp,sp
  594.     push    ds
  595.     lds    si,[bp+12]        ;hi handle
  596.     mov    dx,[si]
  597.     lds    si,[bp+8]               ;lo handle
  598.     mov    cx,[si]
  599.     lds    si,[bp+4]
  600.     mov    bp,[si]              ;set time out
  601.     mov    ax,0C502h        ;set function
  602.     int     21h
  603.     mov    ah,00h
  604.     pop    ds
  605.     pop    bp
  606.     ret    12
  607. WaitSem endp
  608.  
  609.  
  610.  
  611.  
  612.  
  613. ;--------------------------------
  614. ; Semaphores func(197) (C5H) subfunction 03h
  615. ;
  616. ; var
  617. ;    RetCode,HiHandle,LoHandle : Integer;
  618. ;
  619. ; RetCode := SigSem(HiHandle,LoHandle);
  620. ;
  621.  
  622.  
  623. SigSem    proc    near
  624.     push    bp
  625.     mov    bp,sp
  626.     push    ds
  627.     lds    si,[bp+8]               ;hi handle
  628.     mov    dx,[si]
  629.     lds    si,[bp+4]               ;lo handle
  630.     mov    cx,[si]
  631.     mov    ax,0C503h        ;set function
  632.     int    21h
  633.     mov    ah,00h
  634.     pop    ds
  635.     pop    bp
  636.     ret    8
  637. SigSem    endp
  638.  
  639.  
  640.  
  641.  
  642.  
  643. ;--------------------------------
  644. ; Semaphores func(197) (C5H) subfunction 04h
  645. ;
  646. ; var
  647. ;    RetCode,HiHandle,LoHandle : Integer;
  648. ;
  649. ; RetCode := ClosSem(HiHandle,LoHandle);
  650. ;
  651.  
  652.  
  653. ClosSem proc    near
  654.     push    bp
  655.     mov    bp,sp
  656.     push    ds
  657.     lds    si,[bp+8]               ;hi handle
  658.     mov    dx,[si]
  659.     lds    si,[bp+4]               ;lo handle
  660.     mov    cx,[si]
  661.     mov    ax,0C504h        ;set function
  662.     int    21h
  663.     mov    ah,00h
  664.     pop    ds
  665.     pop    bp
  666.     ret    8
  667. ClosSem endp
  668.  
  669.  
  670.  
  671.  
  672.  
  673. ;--------------------------------
  674. ; Get or Set Lock Mode func(198) (C6H)
  675. ;
  676. ; var
  677. ;    Mode,Func : Integer;
  678. ;
  679. ; Mode := setlck(Func);
  680. ;
  681.  
  682.  
  683. setlck    proc    near
  684.     push    bp
  685.     mov    bp,sp
  686.     push    ds
  687.     lds    si,[bp+4]
  688.     mov    ax,[si]               ;set the subfunction
  689.     mov    ah,0C6h         ;set  the function
  690.     int    21h
  691.     mov    ah,0
  692.     pop    ds
  693.     pop    bp
  694.     ret    4
  695. setlck endp
  696.  
  697.  
  698.  
  699.  
  700.  
  701. ;--------------------------------
  702. ; Transactional Backout func(199) (C7H)
  703. ;
  704. ; var
  705. ;    RetCode, Func : Integer;
  706. ;
  707. ; RetCode := BakOuts(Func);
  708. ;
  709.  
  710.  
  711. BakOuts proc    near
  712.     push    bp
  713.     mov    bp,sp
  714.     push    ds
  715.     lds    si,[bp+4]               ;set the subfunction
  716.     mov    ax,[si]
  717.     mov    ah,0C7h         ;set  the function
  718.     int    21h
  719.     mov    ah,0
  720.     pop    ds
  721.     pop    bp
  722.     ret    4
  723. BakOuts endp
  724.  
  725.  
  726.  
  727.  
  728.  
  729. ;--------------------------------
  730. ; Begin transaction  func(200) (C8H)
  731. ;
  732. ; var
  733. ;    RetCode,Mode : Integer;
  734. ;
  735. ; RetCode := btrans(Mode);
  736. ;
  737.  
  738.  
  739. btrans    proc    near
  740.     mov    ah,0C8h
  741.     call    arg1t
  742.     ret    4
  743. btrans    endp
  744.  
  745.  
  746.  
  747.  
  748.  
  749. ;--------------------------------
  750. ; End Transaction func(201) (C9H)
  751. ;
  752. ; var
  753. ;    RetCode : Integer;
  754. ;
  755. ; RetCode := etrans;
  756. ;
  757.  
  758.  
  759. etrans    proc    near
  760.     mov    ah,0C9H
  761.     int    021h
  762.     mov    ah,00h
  763.     ret
  764. etrans    endp
  765.  
  766.  
  767.  
  768.  
  769.  
  770. ;--------------------------------
  771. ; Exc.log File (202) (CA)
  772. ;
  773. ; var
  774. ;    RetCode, FcbAddr : Integer;
  775. ;
  776. ; RetCode := exclog(FcbAddr);
  777. ;
  778.  
  779. exclog    proc    near
  780.     mov    ah,0CAH
  781.     call    arg1f
  782.     ret    4
  783. exclog    endp
  784.  
  785.  
  786.  
  787.  
  788.  
  789. ;--------------------------------
  790. ; Exc Lock Set    func(203) (CBH)
  791. ;
  792. ; var
  793. ;    RetCode, Mode : Integer;
  794. ;
  795. ; RetCode := exclcks(Mode);
  796. ;
  797.  
  798.  
  799. exclcks proc    near
  800.     mov    ah,0CBH
  801.     call    arg1
  802.     ret    4
  803. exclcks endp
  804.     
  805.  
  806.  
  807.  
  808. ;--------------------------------
  809. ; Exclusive file unlock (204) (CC)
  810. ;
  811. ; var
  812. ;    RetCode, FcbAddr : Integer;
  813. ;
  814. ; RetCode := exculkf(FcbAddr);
  815. ;
  816.  
  817.  
  818. exculkf proc    near
  819.     mov    ah,0CCH
  820.     call    arg1f
  821.     ret    4
  822. exculkf endp
  823.  
  824.  
  825.  
  826.  
  827.  
  828. ;--------------------------------
  829. ; Exclusive Unlock Set (205)(CD)
  830. ;
  831. ; var
  832. ;    RetCode : Integer;
  833. ;
  834. ; RetCode := exculks;
  835. ;
  836.  
  837.  
  838. exculks proc    near
  839.     mov    ah,0CDH
  840.     int    21h
  841.     mov    ah,00h
  842.     ret
  843. exculks endp
  844.  
  845.  
  846.  
  847.     
  848.  
  849. ;--------------------------------
  850. ; Exc Clear file func(206) (CEH)
  851. ;
  852. ; var
  853. ;    RetCode, FcbAddr : Integer;
  854. ;
  855. ; RetCode := excclrf(FcbAddr);
  856. ;
  857.  
  858.  
  859. excclrf proc    near
  860.     mov    ah,0CEH
  861.     call    arg1f
  862.     ret    4
  863. excclrf endp
  864.  
  865.  
  866.  
  867.  
  868.  
  869. ;--------------------------------
  870. ; Exc Clear Set  func(207) (CFH)
  871. ;
  872. ; var
  873. ;    RetCode : Integer;
  874. ;
  875. ; RetCode := excclrs;
  876. ;
  877.  
  878.  
  879. excclrs proc    near
  880.     mov    ah,0CFH
  881.     int    21h
  882.     mov    ah,00h
  883.     ret
  884. excclrs endp
  885.  
  886.  
  887.  
  888.  
  889.  
  890. ;--------------------------------
  891. ; Log Record(s) func(208) (D0H)
  892. ;
  893. ; var
  894. ;    RetCode, Flag, Timeout : Integer ;
  895. ;    RecStr    : String[n];
  896. ;
  897. ; RetCode := reclog(RecStr,Flag,Timeout);
  898. ;
  899.  
  900.  
  901. reclog    proc    near
  902.      push     bp
  903.      mov     bp,sp
  904.      push     ds
  905.      lds     si,[bp+8]          ;load flags
  906.      mov     ax,[si]
  907.      lds     si,[bp+4]          ;get timeout
  908.      mov     si,[si]
  909.      lds     dx,[bp+12]         ;get ptr to string
  910.      mov     bp,si              ;move timeout to BP
  911.      mov     ah,0D0h
  912.      int     21h
  913.      mov     ah,0
  914.      pop     ds
  915.      pop     bp
  916.      ret     14
  917. reclog    endp
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924. ;--------------------------------
  925. ; Record Lock func(209) (D1H)
  926. ;
  927. ; var
  928. ;    RetCode, Mode : Integer;
  929. ;
  930. ; RetCode := reclck(Mode);
  931. ;
  932.  
  933.  
  934. reclck    proc    near
  935.      push     bp
  936.      mov     bp,sp
  937.      push     ds
  938.      lds     si,[bp+4]
  939.      mov     bp,[si]
  940.      mov     ah,0D1h
  941.      int     21h
  942.      mov     ah,0
  943.      pop     ds
  944.      pop     bp
  945.      ret     6
  946. reclck    endp
  947.  
  948.  
  949.  
  950.  
  951.  
  952. ;--------------------------------
  953. ; Record Unlock func(210) (D2H)
  954. ;
  955. ; var
  956. ;    RetCode   : Integer;
  957. ;    Semaphore : String[n];
  958. ;
  959. ; RetCode := reculk(Semaphore);
  960. ;
  961.  
  962.  
  963. reculk    proc    near
  964.     mov    ah,0D2H
  965.     call    arg1a
  966.     ret    4
  967. reculk    endp
  968.  
  969.  
  970.  
  971.  
  972.  
  973. ;--------------------------------
  974. ; Unlock Record Set func(211) (D3H)
  975. ;
  976. ; var
  977. ;    RetCode : Integer;
  978. ;
  979. ; RetCode := reculks;
  980. ;
  981.  
  982.  
  983. reculks proc    near
  984.     mov    ah,0D3H
  985.     int    21h
  986.     mov    ah,00h
  987.     ret
  988. reculks endp
  989.  
  990.  
  991.  
  992.  
  993.  
  994. ;--------------------------------
  995. ; Record Clear func(212) (D4H)
  996. ;
  997. ; var
  998. ;    RetCode   : Integer;
  999. ;    Semaphore : String[n];
  1000. ;
  1001. ; RetCode := recclr(Semaphore);
  1002. ;
  1003.  
  1004.  
  1005. recclr    proc    near
  1006.     mov    ah,0D4H
  1007.     call    arg1a
  1008.     ret    4
  1009. recclr    endp
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015. ;--------------------------------
  1016. ; Clear record set func(213) (D5H)
  1017. ;
  1018. ; var
  1019. ;    RetCode : Integer;
  1020. ;
  1021. ; RetCode := recclrs;
  1022. ;
  1023.  
  1024.  
  1025. recclrs proc    near
  1026.     mov    ah,0D5H
  1027.     int    21h
  1028.     mov    ah,00h
  1029.     ret    4
  1030. recclrs endp
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036. ;--------------------------------
  1037. ; End of Job  func(214) (D6H)
  1038. ;
  1039. ; var
  1040. ;    RetCode : Integer;
  1041. ;
  1042. ; RetCode := eoj;
  1043. ;
  1044.  
  1045. eoj    proc    near
  1046.     mov    ah,0D6H
  1047.     int    21h
  1048.     mov    ah,00h
  1049.     ret    4
  1050. eoj    endp
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056. ;--------------------------------
  1057. ; Logout System  func(215) (D7H)
  1058. ;
  1059. ; var
  1060. ;    RetCode : Integer;
  1061. ;
  1062. ; RetCode := sysout;
  1063. ;
  1064.  
  1065.  
  1066. sysout    proc    near
  1067.     mov    ah,0D7H
  1068.     int    21h
  1069.     mov    ah,00h
  1070.     ret    4
  1071. sysout    endp
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077. ;--------------------------------
  1078. ; Vol Statistics func(218) (DAH)
  1079. ;
  1080. ; var
  1081. ;    RetCode,volume : Integer;
  1082. ;    reply  : String[n];
  1083. ;
  1084. ; RetCode := volstat(volume, reply);
  1085.  
  1086.  
  1087. volstat proc    near
  1088.     mov    ah,0DAh
  1089.     push    bp
  1090.     mov    bp,sp
  1091.     push    ds
  1092.     push    es
  1093.     lds    si,[bp+8]     ;addr for the volume number
  1094.     mov    dx,[si]       ;get the volume number
  1095.     les    di,[bp+4]     ;ptr to reply buffer
  1096.     inc    di          ;add 1 to get the address of the string
  1097.     int    21h
  1098.     mov    ah,00h
  1099.     pop    es
  1100.     pop    ds
  1101.     pop    bp
  1102.     ret    8
  1103. volstat endp
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109. ;--------------------------------
  1110. ; Local Disks  func(219) (DBH)
  1111. ;
  1112. ; var
  1113. ;    NumDisks : Integer;
  1114. ;
  1115. ; NumDisks := locdrv;
  1116. ;
  1117.  
  1118.  
  1119. locdrv    proc    near
  1120.     mov    ah,0DBH
  1121.     int    21h
  1122.     mov    ah,00h
  1123.     ret
  1124. locdrv endp
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130. ;--------------------------------
  1131. ; WorkStation ID func(220) (DCH)
  1132. ;
  1133. ; note: This routine returns the station number as an integer.
  1134. ;    It can also be returned in ASCII with this call.
  1135. ;
  1136. ; var
  1137. ;    StationNum : Integer;
  1138. ;
  1139. ; StationNum := wsid;
  1140. ;
  1141.  
  1142.  
  1143. wsid   proc    near
  1144.        mov     ah,0DCH
  1145.        int     21h
  1146.        mov     ah,00h
  1147.        ret
  1148. wsid   endp
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154. ;--------------------------------
  1155. ; Set Error mode func(221) (DDH)
  1156. ;
  1157. ; var
  1158. ;    mode : Integer;
  1159. ;
  1160. ; errmode(mode);
  1161. ;
  1162.  
  1163.  
  1164. errmode proc    near
  1165.     mov    ah,0DDH
  1166.     call    arg1
  1167.     ret    4
  1168. errmode endp
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174. ;--------------------------------
  1175. ; Broadcast Mode func(222) (DEH)
  1176. ;
  1177. ; var
  1178. ;    mode : Integer;
  1179. ;
  1180. ; bcsmode(mode);
  1181. ;
  1182.  
  1183. bcsmode proc    near
  1184.     mov    ah,0DEH
  1185.     call    arg1
  1186.     ret    4
  1187. bcsmode endp
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193. ;--------------------------------
  1194. ; Modify LST Device  func(223) (DFH)
  1195. ;
  1196. ; var
  1197. ;    RetCode, Mode : Integer;
  1198. ;
  1199. ; RetCode := ctlspl(Mode);
  1200. ;
  1201.  
  1202. ctlspl    proc    near
  1203.     mov    ah,0DFh
  1204.     call    arg1
  1205.     ret    4
  1206. ctlspl    endp
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212. ;--------------------------------
  1213. ; Spool Request func(224) (E0H)
  1214. ;
  1215. ; var
  1216. ;    ErrCode         : Integer;
  1217. ;    RequestBlock, Reply : String[n];
  1218. ;
  1219. ; ErrCode := splreq(RequestBlock, Reply);
  1220. ;
  1221.  
  1222. splreq    proc    near
  1223.     mov    ah,0E0h
  1224.     call    req_rep
  1225.     ret    8
  1226. splreq    endp
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232. ;--------------------------------
  1233. ; Pipe Request func(225) (E1H)
  1234. ;
  1235. ; var
  1236. ;    ErrCode         : Integer;
  1237. ;    RequestBlock, Reply : String[n];
  1238. ;
  1239. ; ErrCode := pipreq(RequestBlock, Reply);
  1240. ;
  1241.  
  1242. pipreq    proc    near
  1243.     mov    ah,0E1h
  1244.     call    req_rep
  1245.     ret    8
  1246. pipreq    endp
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252. ;--------------------------------
  1253. ; Directory Path func(226) (E2H)
  1254. ;
  1255. ; var
  1256. ;    ErrCode         : Integer;
  1257. ;    RequestBlock, Reply : String[n];
  1258. ;
  1259. ; ErrCode := dpath(RequestBlock, Reply);
  1260. ;
  1261.  
  1262. dpath    proc    near
  1263.     mov    ah,0E2h
  1264.     call    req_rep
  1265.     ret    8
  1266. dpath    endp
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272. ;--------------------------------
  1273. ; Login system func(227) (E3H)
  1274. ;
  1275. ; var
  1276. ;    ErrCode         : Integer;
  1277. ;    RequestBlock, Reply : String[n];
  1278. ;
  1279. ; ErrCode := syslog(RequestBlock, Reply);
  1280. ;
  1281.  
  1282. syslog    proc    near
  1283.     mov    ah,0E3h
  1284.     call    req_rep
  1285.     ret    8
  1286. syslog    endp
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292. ;--------------------------------
  1293. ; Set File Attribute func(228) (E4H)
  1294. ;
  1295. ; var
  1296. ;    RetCode, FcbAddr, Attribute : Integer;
  1297. ;
  1298. ; RetCode := fattr(FcbAddr, Attribute);
  1299. ;
  1300.  
  1301. fattr    proc    near
  1302.     push    bp
  1303.     mov    bp,sp
  1304.     push    ds
  1305.     lds    si,[bp+4]
  1306.     mov    cx,[si]  ;cx=attribute
  1307.     lds    dx,[bp+8];dx=address of fcb
  1308.     mov    ah,0E4h
  1309.     int    21h
  1310.     mov    ah,0
  1311.     pop    ds
  1312.     pop    bp
  1313.     ret
  1314. fattr    endp
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320. ;--------------------------------
  1321. ; Update file size func(229) (E5H)
  1322. ;
  1323. ; var
  1324. ;    ErrCode,FcbAddr : Integer;
  1325. ;
  1326. ; ErrCode := updfcb(FcbAddr);
  1327. ;
  1328.  
  1329. updfcb    proc    near
  1330.     mov    ah,0E5H
  1331.     call    arg1f
  1332.     ret    4
  1333. updfcb    endp
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339. ;--------------------------------
  1340. ; Copy File to File func(230) (E6H)
  1341. ;
  1342. ; var
  1343. ;    RetCode,FcbSource,FcbDest : Integer;
  1344. ;    CountLow, CountHigh      : Integer;
  1345. ;
  1346. ; RetCode := cpyfile(FcbSource, FcbDest, CountLow, CountHigh)
  1347. ;
  1348. ;
  1349.  
  1350. cpyfile proc    near            
  1351.     mov    ah,0E6h
  1352.     push    bp
  1353.     mov    bp,sp
  1354.     push    ds
  1355.     push    es
  1356.     lds    si,[bp+4]           ;addr of the high byte cnt
  1357.     mov    dx,[si]             ;dx=high word of byte cnt
  1358.     lds    si,[bp+8]           ;addr low word of byte cnt
  1359.     mov    cx,[si]             ;cx=low 16 bits of count
  1360.     les    di,[bp+12]          ;address of dest fcb
  1361.     lds    si,[bp+16]          ;address of the source fcb
  1362.     int    21h
  1363.     mov    ah,0
  1364.     pop    es
  1365.     pop    ds
  1366.     pop    bp
  1367.     ret    16
  1368. cpyfile endp
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374. ;--------------------------------
  1375. ; get time / date string func(231) (E7H)
  1376. ;
  1377. ; var
  1378. ;    time : String[n];
  1379. ;
  1380. ; nettod(time);
  1381. ;
  1382. ; where time is a string of the form Y M D H M S
  1383. ;
  1384.  
  1385. nettod    proc    near
  1386.     mov    ah,0E7h
  1387.     call    arg1a
  1388.     ret    4
  1389. nettod    endp
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395. ;--------------------------------
  1396. ; Set Close mode func(232) (E8H)
  1397. ;
  1398. ; var
  1399. ;    mode : Integer;
  1400. ;
  1401. ; clsmode(mode);
  1402. ;
  1403.  
  1404. clsmode proc    near
  1405.     mov    ah,0E8H
  1406.     call    arg1wor
  1407.     ret    4
  1408. clsmode endp
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415. ;--------------------------------
  1416. ; Shell Base Status func(233) (E9H)
  1417. ;
  1418. ; var
  1419. ;    RetFlags, drive : Integer;
  1420. ;
  1421. ; RetFlags := drvmap(drive);
  1422. ;
  1423.  
  1424. drvmap    proc    near
  1425.     mov    ax,0E900h
  1426.     call    arg1
  1427.     ret    4
  1428. drvmap    endp
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435. ;--------------------------------
  1436. ; Return Shell Version func(234) (EAH)
  1437. ;
  1438. ; var
  1439. ;    RetCode, Mode : Integer;
  1440. ;    EnvirStr      : String[n];
  1441. ;
  1442. ; RetCode := retshl(EnvirStr, Mode);
  1443. ;
  1444.  
  1445. retshl    proc    near
  1446.     push    bp
  1447.     mov    bp,sp
  1448.     push    ds
  1449.     push    es
  1450.     les    di,[bp+8]     ;set es:di to point at the buffer
  1451.     inc    di          ;point di at the start of the data area
  1452.     lds    si,[bp+4]     ;put the mode into al
  1453.     mov    ax,[si]
  1454.     mov    ah,0EAh
  1455.     int    21h
  1456.     mov    ah,00h
  1457.      pop     es
  1458.      pop     ds
  1459.      pop     bp
  1460.     ret    8
  1461. retshl    endp
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467. ;--------------------------------
  1468. ; ascii log File (235) (EB)
  1469. ;
  1470. ; var
  1471. ;    RetCode, Flags, TimeOut : Integer;
  1472. ;    Asciiz            : String[n];
  1473. ;
  1474. ; RetCode := asclog(Flags, TimeOut, Asciiz);
  1475. ;
  1476.  
  1477. asclog    proc    near
  1478.     push    bp
  1479.     mov    bp,sp
  1480.     push    ds
  1481.     lds    si,[bp+12]
  1482.     mov    ax,[si]           ;flags into al
  1483.     lds    dx,[bp+4]         ;pointer to the asciiz string
  1484.     lds    si,[bp+8]
  1485.     mov    bp,[si]           ;time out into bp
  1486.     mov    ah,0EBH
  1487.     int    21h
  1488.     mov    ah,00h
  1489.      pop     ds
  1490.      pop     bp
  1491.     ret    12
  1492. asclog    endp
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498. ;--------------------------------
  1499. ; ASCIIZ file unlock (236) (EC)
  1500. ;
  1501. ; var
  1502. ;    RetCode : Integer;
  1503. ;    Asciiz    : String[n];
  1504. ;
  1505. ; RetCode := asculkf(Asciiz);
  1506. ;
  1507.  
  1508. asculkf proc    near
  1509.     mov    ah,0ECH
  1510.     call    arg1a
  1511.     ret    4
  1512. asculkf endp
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518. ;--------------------------------
  1519. ; ASCIIZ Clear file func(237) (EDH)
  1520. ;
  1521. ; var
  1522. ;    RetCode : Integer;
  1523. ;    Asciiz    : String[n];
  1524. ;
  1525. ; RetCode := ascclrf(Asciiz);
  1526. ;
  1527.  
  1528. ascclrf proc    near
  1529.     mov    ah,0EDH
  1530.     call    arg1a
  1531.     ret    4
  1532. ascclrf endp
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538. ;--------------------------------------------
  1539. ;
  1540. ; Get Physical Station Number  EEH
  1541. ;
  1542. ; var
  1543. ;    StationNo : Integer;
  1544. ;
  1545. ; StationNo := Get_PSN;
  1546. ;
  1547.  
  1548. Get_PSN proc    near
  1549.  
  1550.     mov    ah,0EEh
  1551.     int    21h
  1552.     mov    ah,0
  1553.     ret
  1554. Get_PSN endp
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560. ;-----------------------------------------------------
  1561. ;
  1562. ; Get Shell Table Addresses (239) EFH
  1563. ;
  1564. ; var
  1565. ;    Mode,Segment,Offset : Integer;
  1566. ;
  1567. ; Get_STA(Mode,Segment,Offset);
  1568. ;
  1569.  
  1570. Get_STA proc    near
  1571.     push    bp
  1572.     mov    bp,sp
  1573.     push    es
  1574.     push    ds
  1575.     mov    si,[bp+12]        ;get the mode
  1576.     mov    ax,[si]
  1577.     mov    ah,0EFh         ;set the function
  1578.     int    21h
  1579.     lds    di,[bp+8]        ;store the segment location
  1580.     mov    [di],es
  1581.     lds    di,[bp+4]        ;store the offset location
  1582.     mov    [di],si
  1583.     pop    ds
  1584.     pop    es
  1585.     pop    bp
  1586.     ret    12
  1587. Get_STA endp
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593. ;-----------------------------------------------
  1594. ;
  1595. ; Set Preferred File Server (240) F0H
  1596. ;
  1597. ; var
  1598. ;    RetServer, Mode, NewServ : Integer;
  1599. ;
  1600. ; RetServer := SetServ(Mode,NewServ);
  1601. ;
  1602.  
  1603. SetServ proc    near
  1604.     push    bp
  1605.     mov    bp,sp
  1606.     push    ds
  1607.     mov    si,[bp+8]        ;get the mode
  1608.     mov    ax,[si]
  1609.     mov    di,[bp+4]        ;set the preferred server number
  1610.     mov    dx,[di]
  1611.     mov    ah,0F0h         ;set the function
  1612.     int    21h
  1613.     mov    ah,0
  1614.     pop    ds
  1615.     pop    bp
  1616.     ret    6
  1617. SetServ endp
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623. ;-----------------------------------------------------------
  1624. ;
  1625. ; Attach/Detach To File Server (241) F1H
  1626. ;
  1627. ; var
  1628. ;    RetCode, Mode, NewServ : Integer;
  1629. ;
  1630. ; RetCode := ModServ(Mode,NewServ);
  1631. ;
  1632.  
  1633. ModServ proc    near
  1634.     push    bp
  1635.     mov    bp,sp
  1636.     push    ds
  1637.     lds    si,[bp+8]        ;get the mode
  1638.     mov    ax,[si]
  1639.     lds    di,[bp+4]        ;set the preferred server number
  1640.     mov    dx,[di]
  1641.     mov    ah,0F1h         ;set the function
  1642.     int    21h
  1643.     mov    ah,0
  1644.     pop    ds
  1645.     pop    bp
  1646.     ret    6
  1647. ModServ endp
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653. ;-------------------------------
  1654. ; Place a single integer argument into dx
  1655. ; with a return code
  1656.  
  1657. arg1    proc    near
  1658.     push    bp
  1659.     mov    bp,sp
  1660.     push    ds
  1661.     lds    si,[bp+6]
  1662.     mov    dx,[si]    ;dx gets the argument
  1663.     int    21h
  1664.     mov    ah,0       ;clear ah for al return code
  1665.     pop    ds
  1666.     pop    bp
  1667.     ret
  1668. arg1    endp
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674. ;--------------------------------
  1675. ; Place a single integer argument into bp
  1676. ; for use with time outs - with a return code
  1677.  
  1678. arg1t    proc    near
  1679.     push    bp
  1680.     mov    bp,sp
  1681.     push    ds
  1682.     lds    si,[bp+6]
  1683.     mov    bp,[si]    ;dx gets the argument
  1684.     int    21h
  1685.     mov    ah,0       ;clear ah for al return code
  1686.     pop    ds
  1687.     pop    bp
  1688.     ret
  1689. arg1t    endp
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696. ;--------------------------------
  1697. ; Process an fcb address in a
  1698. ; function call with a return code
  1699.  
  1700. arg1f    proc    near
  1701.     push    bp
  1702.     mov    bp,sp
  1703.     push    ds
  1704.     lds    dx,[bp+6]      ;dx gets the argument
  1705.     int    21h
  1706.     mov    ah,0           ;clear ah for al return code
  1707.     pop    ds
  1708.     pop    bp
  1709.     ret
  1710. arg1f    endp
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716. ;--------------------------------
  1717. ; Process a single string argument in a
  1718. ; function call with a return code
  1719.  
  1720. arg1a    proc    near
  1721.     push    bp
  1722.     mov    bp,sp
  1723.     push    ds
  1724.     lds    dx,[bp+6]     ;ptr to parameter string
  1725.     int    21h
  1726.     mov    ah,0          ;clear ah for al return code
  1727.     pop    ds
  1728.     pop    bp
  1729.     ret
  1730. arg1a    endp
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737. ;----------------------------
  1738. ; Perform a single integer argument
  1739. ; but without a return code
  1740.  
  1741. arg1wor proc    near
  1742.     push    bp
  1743.     mov    bp,sp
  1744.     push    ds
  1745.     lds    si,[bp+6]
  1746.     mov    dx,[si]       ;dx gets the arg (or ptr)
  1747.     int    21h
  1748.     pop    ds
  1749.     pop    bp
  1750.     ret
  1751. arg1wor endp
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758. ;----------------------------
  1759. ; Perform a single string argument
  1760. ; but without a return code
  1761.  
  1762. arg1awor proc    near
  1763.     push    bp
  1764.     mov    bp,sp
  1765.     push    ds
  1766.     lds    dx,[bp+6]
  1767.     inc    dx          ;add 1 to get the start of the string
  1768.     int    21h
  1769.     pop    ds
  1770.     pop    bp
  1771.     ret
  1772. arg1awor endp
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779. ;----------------------------
  1780. ; Handle a request$ and reply$ function
  1781. ; with error code
  1782.  
  1783. req_rep proc    near
  1784.     push    bp
  1785.     mov    bp,sp
  1786.     push    ds
  1787.     push    es
  1788.     lds    si,[bp+10]       ;ptr to req. string
  1789.     inc    si            ;add 1 to get the address of the string
  1790.     les    di,[bp+6]       ;ptr to var desc block for reply buf
  1791.     inc    di            ;add 1 to get the address of the string
  1792.     pushf                  ;save the direction flag
  1793.     int    21h
  1794.     popf
  1795.     mov    ah,0
  1796.     pop    es
  1797.     pop    ds
  1798.     pop    bp
  1799.     ret
  1800. req_rep endp
  1801.  
  1802.  
  1803.  
  1804. cseg    ends
  1805.     end
  1806.